package com.example.learn_vpn.model;

import java.util.ArrayList;
import java.util.List;

public class NetworkConfig {
    private String mac;
    private String mtu;
    private boolean broadcast;
    private boolean bridging;
    private boolean routeViaZeroTier;
    private boolean useCustomDNS;
    private int dnsMode;

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public String getMtu() {
        return mtu;
    }

    public void setMtu(String mtu) {
        this.mtu = mtu;
    }

    public boolean isBroadcast() {
        return broadcast;
    }

    public void setBroadcast(boolean broadcast) {
        this.broadcast = broadcast;
    }

    public boolean isBridging() {
        return bridging;
    }

    public void setBridging(boolean bridging) {
        this.bridging = bridging;
    }

    public boolean isRouteViaZeroTier() {
        return routeViaZeroTier;
    }

    public void setRouteViaZeroTier(boolean routeViaZeroTier) {
        this.routeViaZeroTier = routeViaZeroTier;
    }

    public boolean isUseCustomDNS() {
        return useCustomDNS;
    }

    public void setUseCustomDNS(boolean useCustomDNS) {
        this.useCustomDNS = useCustomDNS;
    }

    public int getDnsMode() {
        return dnsMode;
    }

    public void setDnsMode(int dnsMode) {
        this.dnsMode = dnsMode;
    }

    public List<AssignedAddress> getAssignedAddresses() {
        return assignedAddresses;
    }

    public void setAssignedAddresses(List<AssignedAddress> assignedAddresses) {
        this.assignedAddresses = assignedAddresses;
    }

    public List<DnsServer> getDnsServers() {
        return dnsServers;
    }

    public void setDnsServers(List<DnsServer> dnsServers) {
        this.dnsServers = dnsServers;
    }

    public NetworkConfig(String mac, String mtu, boolean broadcast, boolean bridging, boolean routeViaZeroTier, boolean useCustomDNS, int dnsMode, List<AssignedAddress> assignedAddresses, List<DnsServer> dnsServers,List<AppNode>appNodes) {
        this.mac = mac;
        this.mtu = mtu;
        this.broadcast = broadcast;
        this.bridging = bridging;
        this.routeViaZeroTier = routeViaZeroTier;
        this.useCustomDNS = useCustomDNS;
        this.dnsMode = dnsMode;
        this.assignedAddresses = assignedAddresses;
        this.dnsServers = dnsServers;
        this.appNodes = appNodes;
    }

    public List<AppNode> getAppNodes() {
        return appNodes;
    }

    private List<AssignedAddress> assignedAddresses=new ArrayList<>();

    private List<DnsServer> dnsServers=new ArrayList<>();
    private List<AppNode> appNodes=new ArrayList<>();

    @Override
    public String toString() {
        return "NetworkConfig{" +
                "mac='" + mac + '\'' +
                ", mtu='" + mtu + '\'' +
                ", broadcast=" + broadcast +
                ", bridging=" + bridging +
                ", routeViaZeroTier=" + routeViaZeroTier +
                ", useCustomDNS=" + useCustomDNS +
                ", dnsMode=" + dnsMode +
                ", assignedAddresses=" + assignedAddresses +
                ", dnsServers=" + dnsServers +
                '}';
    }
}
